<template>
    <div>
      <div class="back">
        <router-link to="/"> ← </router-link>
        <p>回到首页</p>
        <p>1</p>
      </div>
      <h1>详情页</h1>
      <p>这是 ID 为 {{ id }} 的项目的详细信息。</p>
    </div>
  </template>
  
  <script>
  export default {
    props: ['id'], // 接收路由参数
  }
  </script>
  
  <style scoped>
  .body {
    position: relative;
  }
  
  .back {
    width: 100%;
    height: 40px;
    position: fixed;
    top: 0;
    left: 0;
    line-height: 40px;
    background-color: hotpink;
    text-align: center;
    color: #fff;
    display: flex;
    padding: 0 10px;
    justify-content: space-between;
    align-items: center;
  }
  
  h1 {
    color: #000;
    width: 100%;
    height: 40px;
    line-height: 40px;
    text-align: center;
    margin-top: 50px;
  }
  </style>